<?php
    include_once('../src/classes/class.mssql.php');
    session_start();
    $db = new MSSQL();
    $stmt = $db->query("SELECT name, lastname1, lastname2 FROM [dbo].[users] WHERE comtec_id_user = ".$_GET['id']);
    sqlsrv_fetch($stmt);
    $username = sqlsrv_get_field($stmt,0)." ".sqlsrv_get_field($stmt,1)." ".sqlsrv_get_field($stmt,2);
    switch($_SESSION['users']){
     case 'managers':
      $profile = 'Gerente';       
     break;
     case 'administratives-1':
      $profile = 'Administrativo 1';       
     break;
     case 'administratives-2':
      $profile = 'Administrativo 2';      
     break;
     case 'technicians':
      $profile = 'T&eacute;cnico';      
     break;
     case 'clients':
      $profile = 'Cliente';     
     break;
    }
?>
<?=$username;?><br>
<?=$profile;?><br>
<a class="link" href="http://<?=$_SERVER['HTTP_HOST'];?>/src/scripts/close_session.php">Cerrar sesi&oacute;n</a>
